

function onmessage(messg){
    alert(messg+' receieved!');
}

function onerror(error){
    alert(error);
}

function onopened(){
    var name="junk";
}